import request from "../utils/request";

//班级列表查询-条件分页查询
export const queryPageApi = (name,begin,end,page,pageSize) => {
    return request.get(`/clazzs?name=${name}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`)
}

// 新增班级
export const addApi = (clazz) => {
    return request.post('/clazzs',clazz)
}

// 修改班级--查询回显-根据ID查询
export const queryInfoApi = (id) => {
    return request.get(`/clazzs/${id}`)
}

// 修改-保存
export const updateApi = (clazz) => {
    return request.put('/clazzs',clazz)
}


// 删除班级
export const deleteApi = (id) => {
    return request.delete(`/clazzs/${id}`)
}


// 查询所有班级
export const queryAllApi = () => {
    return request.get('/clazzs/list')
}
